<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * @author Thanh Nguyen Dinh<thanhnguyendinh@admicro.vn>
 * @copyright 2013
 */
class Landing extends MX_Controller
{
    
    public function __construct()
    {
        parent::__construct();
        $this->load->library('Default_Layout');
        $this->load->library('Minifier');
        $this->load->model('landing/landing_model');
    }

    public function index()    
    {  
        $data = array();
    	$this->minifier->AddCss('stylenivo');
    	$this->minifier->AddCss('nivo-slider');
    	$this->minifier->AddCss('defaultnivo');         
        $this->minifier->AddJsNoPack('jquery.nivo.slider.pack');
        $this->minifier->AddJsNoPack('jquery.nivo.slider');
        $this->default_layout->_loadHeader(''); 
        $data['gioithieu_vcc'] = $this->landing_model->get_content_by_id(1);
        $data['gioithieu_adword'] = $this->landing_model->get_content_by_id(2);    
        $data['gioithieu_flow'] = $this->landing_model->get_content_by_id(3);               
        $this->load->view('landing/landing_view',$data);     
        $this->default_layout->_loadFooter();    
    } 	 
    
    public function content(){
        $this->default_layout->_loadHeader('');         
        $id = $this->uri->rsegment(3);
        $data = array();
        $data['content'] = $this->landing_model->get_content_by_id($id);
        $this->load->view('landing/content_view',$data);  
        $this->default_layout->_loadFooter();           
    } 

}

?>
